package com.rockcent.mall.lib.repository;

import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.Article;
import com.rockcent.mall.lib.domain.PromotionCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * Created by marco on 2017/8/2.
 */
@Repository
public interface PromotionCodeRepository extends JpaRepository<PromotionCode, Long>, JpaSpecificationExecutor,PromotionCodeRepositoryCustom {
    PromotionCode findByIdAndMallId(Long id, Long mallId);
    PromotionCode findByMallIdAndCodeDefault(Long mallId, Whether codeDefault);
}
